package com.syni.mdd.yhd.common.all.utils.auth;

import com.alibaba.fastjson.JSON;
import com.syni.mdd.yhd.common.all.entity.user.BmsUser;
import lombok.Data;

/**
 * @className AuthUserBo
 * @description TOO
 * @Author cfx
 * @DATE 2020/4/10 9:43
 * @VERSION 1.0
 **/
@Data
public class AuthUserBo {
    private String userId;
    private String roleId;
    private Integer client;
    private String phone;

    public AuthUserBo() {
    }

    public AuthUserBo(String userId, String roleId, Integer client) {
        this.userId = userId;
        this.client = client;
        this.roleId = roleId;
    }

    public AuthUserBo(BmsUser bmsUser, String roleId, Integer client) {
        this.userId = bmsUser.getId().toString();
        this.client = client;
        this.roleId = roleId;
        this.phone = bmsUser.getPhone();
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
